#ifndef __API_SYSBASE_H__
#define __API_SYSBASE_H__

/**
 * 整机状态机
*/
typedef enum{
    SYS_STATE_POWERON=0x00,//系统上电
    SYS_STATE_TURNOFF=0x01,//系统关机
    SYS_STATE_TURNON=0x02,//系统开机
    SYS_STATE_ERR=0x03,//系统异常
    SYS_STATE_DISPCHECK=0x04,//系统：显示板自检
    SYS_STATE_PWRCHECK=0x05,//系统：电源板自检
    SYS_STATE_SHOW=0x06,//系统：演示
	SYS_STATE_FCT=0x07,//系统：FCT
}SYS_STATE;


extern void Api_SysBase_SetState(SYS_STATE state);
extern SYS_STATE Api_SysBase_GetState(void);
extern SYS_STATE Api_SysBase_GetLastState(void);

extern unsigned char Api_SysBase_IsEnter(void);
extern unsigned char Api_SysBase_IsQuite(void);
extern void Api_SysBase_SetEnterFlag(void);
extern void Api_SysBase_ClearEnterFlag(void);
extern void Api_SysBase_ClearQuiteFlag(void);

extern void Api_SysBase_Init(void);





typedef struct {
    SYS_STATE state;
    SYS_STATE laststate;
    unsigned char flagEnter;
    unsigned char flagQuite;
}SYS_CB;

extern SYS_CB* Api_SysBase_GetSysCB(void);

#endif
